package com.alangyun.remind.vo.leader;

import java.io.Serializable;
import java.util.Date;

import com.alangyun.remind.repository.data.LeaderCaution;
import com.alangyun.remind.utils.Utility;

public class LeaderUser implements Serializable {

	/** 人员编号 * */
	private String no;
	/** 姓名 * */
	private String name;
	/** 岗位大类 * */
	private String job;
	/** 性别 * */
	private String gender;
	/** 年龄 * */
	private Integer yearOld;
	/** 现任岗位 * */
	private String xrgw;
	/** 上岗时间 * */
	private Date sgsj;
	/** 在岗时长 * */
	private Integer zgsc;
	/** 轮岗年限 * */
	private Integer lgnx;
	/** 距离轮岗时间 * */
	private Double jllgsj;
	
	public static LeaderUser from(LeaderCaution source) {
		LeaderUser ret = new LeaderUser();

		ret.no=source.getId();
		ret.name=source.getName();
		ret.job="";
		ret.gender=source.getGender();
		ret.yearOld=source.getYearOld();
		ret.xrgw=source.getXrgw();
		ret.sgsj=source.getSgsj();
		ret.lgnx=source.getLgnx();
		ret.jllgsj=source.getJllgsj();
		
		if(ret.sgsj!=null) {
			ret.zgsc = Utility.ageLimit(ret.sgsj);
		}
		
		return ret;
	}

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getJob() {
		return job;
	}

	public void setJob(String job) {
		this.job = job;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public Integer getYearOld() {
		return yearOld;
	}

	public void setYearOld(Integer yearOld) {
		this.yearOld = yearOld;
	}

	public String getXrgw() {
		return xrgw;
	}

	public void setXrgw(String xrgw) {
		this.xrgw = xrgw;
	}

	public Date getSgsj() {
		return sgsj;
	}

	public void setSgsj(Date sgsj) {
		this.sgsj = sgsj;
	}

	public Integer getZgsc() {
		return zgsc;
	}

	public void setZgsc(Integer zgsc) {
		this.zgsc = zgsc;
	}

	public Integer getLgnx() {
		return lgnx;
	}

	public void setLgnx(Integer lgnx) {
		this.lgnx = lgnx;
	}

	public Double getJllgsj() {
		return jllgsj;
	}

	public void setJllgsj(Double jllgsj) {
		this.jllgsj = jllgsj;
	}

}
